import request from '@/utils/request';
import axiosUpdate from "@/utils/http";

const rwsUrl =
  process.env.NODE_ENV === 'development'
    ? 'http://dev.c85eaf0d05d04465a81befded3f4f608b.cn-shenzhen.alicontainer.com'
    : window.location.origin;

export async function fetch() {
  return request('/api/fake_chart_data');
}

// 查询客户明细信息
export async function getProfileDetail(data:any) {
  console.log(data);
  return axiosUpdate.get(
    `${rwsUrl}/rwscxm/api/v1/customer/profile/customers_detail?customerId=${
      data.customerId
      }&userId=${data.userId}&notCallExternalSystem=1`
  );
}

export async function getCustomerInfo(req:any) {
  console.log(req);
  return axiosUpdate.get(
    `/api/customer/${req.customerId}`
  );
}
